<form action="<?php echo base_url('User/AccountService/passwordRecovery'); ?>" method="post">

	<h1><?php echo $this->l('Retrieves password'); ?></h1>
    <?php include(((BASEPATH == '/')?'':dirname(BASEPATH)).'/'.APPPATH.'views/Templates/flashMessage.php'); ?>
	
	<div class="login-fields">
		
		<p><?php echo $this->l('Sign in using your registered account:'); ?></p>
		
		<div class="field<?php echo (form_error('username'))?' error':''; ?>">
			<label for="username"><?php echo $this->l('Username:'); ?></label>
			<input type="text" id="username" name="username" 
                   <?php echo empty($connected)?'':' readonly="readonly"'; ?>
                   value="<?php echo set_value('password'); ?>" 
                   placeholder="<?php echo empty($connected)?$this->l('Username'):set_value('password'); ?>" class="form-control input-lg username-field" />
             
             <?php echo form_error('username', '<span class="error">', '</span>'); ?>
		</div> <!-- /field -->
    

    	<?php if (!empty($connected)) : ?>

        <input type="hidden" id="id_user" name="id_user" readonly="readonly" value="<?php echo set_value('id_user'); ?>" />
        
		<div class="field<?php echo (form_error('passwd_old'))?' error':''; ?>">
			<label for="passwd_old"><?php echo $this->l('Old password:'); ?></label>
			<input type="password" id="passwd_old" name="passwd_old" 
                   value="<?php echo set_value('passwd_old'); ?>" 
                   placeholder="<?php echo $this->l('Old password'); ?>" class="form-control input-lg password-field"/>
            
            <?php echo form_error('passwd_old', '<span class="error">', '</span>'); ?>
		</div> <!-- /old password -->
    
    	<?php endif; ?>
		
		<div class="field<?php echo (form_error('passwd'))?' error':''; ?>">
			<label for="password"><?php echo $this->l('Password:'); ?></label>
			<input type="password" id="password" name="passwd" 
                   value="<?php echo set_value('passwd'); ?>" 
                   placeholder="<?php echo $this->l('Password'); ?>" class="form-control input-lg password-field"/>
             
             <?php echo form_error('passwd', '<span class="error">', '</span>'); ?>
		</div> <!-- /password -->
		
		<div class="field<?php echo (form_error('passwd_confirm'))?' error':''; ?>">
			<label for="passwd_confirm"><?php echo $this->l('Confirm Password:'); ?></label>
			<input type="password" id="passwd_confirm" name="passwd_confirm" 
                   value="<?php echo set_value('passwd_confirm'); ?>" 
                   placeholder="<?php echo $this->l('Confirm password'); ?>" class="form-control input-lg password-field"/>
             
             <?php echo form_error('passwd_confirm', '<span class="error">', '</span>'); ?>
		</div> <!-- /password confirmation -->
		
	</div> <!-- /login-fields -->
	
	<div class="login-actions">
					
		<button class="login-action btn btn-primary" name="btn_submit"><?php echo $this->l('Retrives password'); ?></button>
		
	</div> <!-- .actions -->
	
</form>


